package com.homework.advice;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;

import org.springframework.stereotype.Component;

@Component
@Aspect //升级切面类：配置切入点和通知的方式
public class MyAdvice {

    @Pointcut("execution(* com.homework.service.impl.ArticleServiceImpl.*(..))")
    public void myPoint() {

    }

    @Before("MyAdvice.myPoint()")
    public void before() {
        System.out.println("前置增强..");
    }
}